home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / printing / vbrotary / vbrotary.bas next >
Encoding:
BASIC Source File  |  1995-07-12  |  20.2 KB  |  575 lines

  1. '***************************************************************************
  2. '⌐Copyright 1995, P. Scott Antony
  3. 'P.O. Box 11047
  4. 'Milwaukee, WI  53211
  5. '74002,2373@compuserve.com
  6. 'PSAntony@aol.com
  7. 'Author of the Shareware programs: HOLIDAYS!⌐, and Easy Uploads⌐.
  8. '***************************************************************************
  9. '*** IMPORTANT ***
  10.  
  11. 'AN INDIVIDUAL MAY USE THIS CODE FOR THEIR PERSONAL PROGRAMMING USE,
  12. 'COMPANIES MAY USE THIS CODE FOR THEIR "IN HOUSE" PROGRAMMING USE,
  13. 'OR ANYONE CAN USE THIS CODE IN A FREEWARE OR PUBLIC DOMAIN SOFTWARE PRODUCT,
  14. 'WITHOUT ROYALTY, FEE, OR REGISTRATION (although I'd still like to hear
  15. 'about your program - see below).
  16.  
  17. 'ANYONE WISHING TO USE THE CODE IN A COMMERCIAL, OR SHAREWARE (FOR FEE)
  18. 'PROGRAM, MUST REGISTER WITH THE AUTHOR (ME). THERE'S NO CHARGE, BUT YOU
  19. 'MUST REGISTER IT'S USE. SIMPLY SEND A NOTE (EMAIL OR POSTAL TO THE ADDRESS
  20. 'ABOVE) NOTING YOUR NAME, AND THE PROGRAM YOU'RE INCLUDING IT IN.
  21. 'YOU DON'T HAVE TO WAIT TO GET ANYTHING BACK FROM ME. ONCE IT'S IN THE MAIL
  22. 'GO AHEAD, AND CONSIDER THAT IT'S REGISTERED (e.g. you won't be refused).
  23.  
  24. '(obviously there's no real good reason to make you do this, other than I
  25. 'enjoy getting email, and knowing how the code is being used. Also, please
  26. 'include where on CIS, or AOL I can find your program, and what it does).
  27.  
  28. '***************************************************************************
  29. 'Printing a Rotary (ROLODEX) Card
  30.  
  31. 'This module will print Rotary Cards to the Printer object.
  32. 'It has been modularized so you can simply add it to your project,
  33. 'and print a card from ANY module or object.  All the necessary code
  34. 'and Constants you need are here.  Read On...
  35.  
  36. 'If you like, you can also modify the code to print to a Form.
  37. 'Simply replace "Printer." with "Form1." (your form name), throughout the
  38. 'module, and then remove the Printer.EndDoc command from the Print_Rotary()
  39. 'subroutine, and the rDoEnd variable from the Sub declaration and
  40. 'calling statements. (See ROTARYFM.BAS)
  41.  
  42. '***************************************************************************
  43. '   Subroutine for Printing a Rotary Card to the Printer Object
  44. '   *Note the continuation character (_) below.
  45. '   (e.g. the following would normally be entered on a single line).
  46. '***************************************************************************
  47. 'Sub Print_Rotary (rBeginX As Double, rBeginY As Double, rSize As Integer, _
  48. ' rTab As Integer, rLineType As Integer, rCorner as Integer, rDoEnd As Integer)
  49. '***************************************************************************
  50.  
  51. '   rBeginX and rBeginY are dimensions (MUST be in Inches) specifying the
  52. '   upper left corner of the card (not including any Tab).
  53.  
  54. '* If you pass a Variable for rBeginX or rBeginY, instead of numbers,
  55. '  it MUST be of 'Double' Type!
  56.  
  57. '   rSize is the Size of the Card. This code will Print either a 2╝" x 4"
  58. '   or 3" x 5" Rotary Card. I've provided Constants below for this
  59. '   (CARD_2x4 or CARD_3x5).
  60.  
  61. '   rTab is the Placement of the Tab. This code will Print either Left,
  62. '   Right, or No Tab. I've provided Constants below for this
  63. '   (NO_TAB, LEFT_TAB, or RIGHT_TAB).
  64.  
  65. '   rLineType is the Type of Line to use when drawing the card.
  66. '   I've provided Constants below for this (SOLID_LINE, DASHED_LINE, etc.).
  67.  
  68. '   rCorner is the Type of Corner to draw on the card. BOTH types have
  69. '   the rounded corner, but the square corners make it easier to cut
  70. '   with a paper cutter. I've provided Constants below for this
  71. '   (SQ_CORNER, RND_CORNER).
  72.  
  73. '   rDoEnd is a Boolean (True/False), whether to send the Printer.EndDoc()
  74. '   command after finishing the card. This allows you to avoid muddying your
  75. '   code with Printer statements, and you can print multiple cards on a page.
  76.  
  77. '***************************************************************************
  78. '***  ENTERING YOUR OWN DATA
  79.  
  80. '*EMBEDDED* in the Print_Rotary() subroutine are calls to the other
  81. 'subroutines in this module. These other subroutines add the text to
  82. 'the card and tab, print the arcs for the corners, print the little scissors
  83. 'wingding, and the T hole.
  84.  
  85. 'YOU WILL want to alter the Text in the PrintCardText(), and PrintTabText()
  86. 'subroutines to reflect YOUR DATA. The remaining three subroutines should
  87. 'not need to altered in any way.
  88.  
  89. '***  EMBEDDED Subroutines
  90. '======================================================
  91. 'PrintTabText ()
  92. 'PrintCardText (rBeginX As Double, rBeginY As Double)
  93.  
  94. 'PrintTHole ()
  95. 'PrintArc (Qdrnt As Integer, rRad As Double)
  96. 'PrintScissors (rBeginX As Double, rBeginY As Double)
  97.  
  98. '***************************************************************************
  99. 'EXAMPLES:
  100. '* I like to see the parentheses (), so I MUST include the "Call" word.
  101. '* You can omit the parentheses, as long as you also remove "Call".
  102.  
  103. '   Sub Print_1()
  104. '       Call Print_Rotary(1, 1, CARD_2x4, LEFT_TAB, DOTTED_LINE, RND_CORNER, True)
  105. '   End Sub
  106.  
  107. 'The above will print a 2╝" x 4" card, positioned at X = 1", and Y = 1",
  108. 'with Dotted lines, rounded corners, and a Left tab. True will eject the page.
  109.  
  110. 'The above, without the Constants, OR the "Call" could be entered as:
  111.  
  112. '       Print_Rotary 1, 1, 0, 1, 2, 1, True
  113.  
  114. '***************************************************************************
  115. 'Sub Print_3()
  116. '   Call Print_Rotary(3.5, 1, CARD_2x4, RIGHT_TAB, SOLID_LINE, RND_CORNER, False)
  117. '   Call Print_Rotary(3.5, 4, CARD_2x4, NO_TAB, DOTTED_LINE, SQ_CORNER, False)
  118. '   Call Print_Rotary(2.5, 7, CARD_3x5, LEFT_TAB, DOTTED_LINE, RND_CORNER, True)
  119. 'End Sub
  120.  
  121. '*Notice the False, False, True pattern for the final parameter.
  122.  
  123. 'The above will print two 2╝" x 4" cards down the right side of the page
  124. '(rBeginX(1) = 3.5, which leaves a 1" margin on the right) with the second
  125. 'beginning 3 inches down the page after the first (rBeginY(1) = 1,
  126. 'rBeginY(2) = 4). Starting down yet another 3 inches (rBeginY(3) = 7)
  127. 'it prints a 3" x 5" card, which leaves a 1" margin on the bottom.
  128. 'Note that (rBeginX(3) = 2.5, which leaves a 1" margin on the right for the
  129. 'larger 5" card).
  130.  
  131. 'The page is not ejected until Print_Rotary() receives a True for the rDoEnd
  132. 'parameter, so that these 3 cards would be printed on the same page.
  133.  
  134. 'The above, without using the Constants could be entered as:
  135.  
  136. '       Call Print_Rotary(3.5, 1, 0, 2, 0, 1, False)
  137. '       Call Print_Rotary(3.5, 4, 0, 0, 2, 0, False)
  138. '       Call Print_Rotary(2.5, 7, 1, 1, 2, 1, True)
  139.  
  140. '***************************************************************************
  141. 'These variables are only DIMensioned for THIS module.
  142.  
  143. 'ROTARY CARD VARIABLES
  144. Dim RAD_CONV As Double
  145. Dim rotTabX As Double
  146. Dim rotTabY As Double
  147. Dim rotNameX As Double
  148. Dim rotNameY As Double
  149. Dim rotWidth As Double
  150. Dim rotHeight As Double
  151. Dim rotMid As Double
  152. Dim rotBar As Double
  153. Dim rotMsg As String
  154. Dim rotCurStyle As Integer
  155. Dim rotArcColor As Integer
  156.  
  157. 'These are Global Constants so you can call Print_Rotary() from any module.
  158.  
  159. 'ROTARY CARD SIZE CONSTANTS
  160. Global Const CARD_2x4 = 0
  161. Global Const CARD_3x5 = 1
  162.  
  163. 'ROTARY CARD TAB STYLES
  164. Global Const NO_TAB = 0
  165. Global Const LEFT_TAB = 1
  166. Global Const RIGHT_TAB = 2
  167.  
  168. 'ROTARY CARD LINE STYLES
  169. Global Const SOLID_LINE = 0
  170. Global Const DASHED_LINE = 1
  171. Global Const DOTTED_LINE = 2
  172. Global Const DASHDOT_LINE = 3
  173. Global Const DASHDOTDOT_LINE = 4
  174.  
  175. 'ROTARY CARD CORNER STYLES
  176. Global Const SQ_CORNER = 0
  177. Global Const RND_CORNER = 1
  178.  
  179. 'PI
  180. Global Const PI = 3.14159265358979     'used for RAD_CONV
  181.  
  182. '
  183. 'This is the Main Subroutine (it calls ALL other Subroutines in this module)
  184. '
  185. 'Pass rBeginX and rBeginY as the "Upper Left Corner of the Rectangle" (in inches)
  186. '* If you pass a Variable for rBeginX or rBeginY, instead of numbers,
  187. '  it MUST be of 'Double' Type!
  188. '
  189. 'Pass rSize from the CONSTANTS - CARD_2x4 (0) or CARD_3x5 (1)
  190. 'Pass rTab from the CONSTANTS - NO_TAB (0), or LEFT_TAB (1), or RIGHT_TAB (2)
  191. 'Pass rLineType from the CONSTANTS - SOLID_LINE (0), etc.
  192. 'Pass rCorner from the CONSTANTS - SQ_CORNER (0), RND_CORNER (1)
  193. 'Pass rDoEnd as True/False as to whether to send the Printer.EndDoc command
  194. '
  195. 'EXAMPLE:
  196. 'Call Print_Rotary(1, 1, CARD_2x4, LEFT_TAB, DOTTED_LINE, RND_CORNER, True)
  197. '
  198. '  is the same as...
  199. 'Call Print_Rotary(1, 1, 0, 1, 2, 1, True)
  200. '
  201. '  is the same as...
  202. 'Print_Rotary 1, 1, 0, 1, 2, 1, True
  203. '
  204. Sub Print_Rotary (rBeginX As Double, rBeginY As Double, rSize As Integer, rTab As Integer, rLineType As Integer, rCorner As Integer, rDoEnd As Integer)
  205.  
  206. Select Case rSize
  207.     
  208.     '2╝" x 4" card
  209.     Case 0  'I don't use the constants here, in case you delete them.
  210.         rotWidth = 4
  211.         rotHeight = 2.2
  212.         rotMid = 7
  213.         rBarX = 2.15
  214.         rBarY = 1.5
  215.         rotMsg = "For Your 2╝"" x 4"" Rotary File"
  216.     
  217.     '3" x 5" card
  218.     Case 1  'I don't use the constants here, in case you delete them.
  219.         rotWidth = 5
  220.         rotHeight = 2.95
  221.         rotMid = 15
  222.         rBarX = 2.5
  223.         rBarY = 2.25
  224.         rotMsg = "For Your 3"" x 5"" Rotary File"
  225. End Select
  226. 'Set the scale to inches
  227. Printer.ScaleMode = 5
  228. 'DrawWidth must be 1 for dotted/dashed lines
  229. Printer.DrawWidth = 1
  230. Printer.DrawStyle = rLineType
  231. '*************************************************************************
  232. 'compensate for rounded corners
  233. If rCorner = 1 Then
  234.     rotWidth = rotWidth - .1
  235.     rotHeight = rotHeight - .1
  236. End If
  237. 'top of card
  238. Select Case rTab
  239.     Case 0  'no Tab
  240.         If rCorner = 1 Then
  241.             'offset X and make room for next arc
  242.             Printer.Line (rBeginX + .1, rBeginY)-Step(rotWidth - .1, 0)
  243.         Else
  244.             'start at the corner
  245.             Printer.Line (rBeginX, rBeginY)-Step(rotWidth, 0)
  246.         End If
  247.     
  248.     Case 1  'left Tab
  249.         'begin the tab (angle up)
  250.         Printer.Line (rBeginX, rBeginY)-Step(.2, -.3)
  251.         '*************************************************************************
  252.             'grab the CurrentX and CurrentY to put text here later
  253.             rotTabX = Printer.CurrentX + .05
  254.             rotTabY = Printer.CurrentY + .06
  255.         '*************************************************************************
  256.         'top of the tab
  257.         Printer.Line Step(0, 0)-Step(1.95, 0)
  258.         'finish the tab (angle down)
  259.         Printer.Line Step(0, 0)-Step(.2, .3)
  260.         'draw up to the right of the tab
  261.         Printer.Line Step(0, 0)-Step(((rotWidth - 3) + .625), 0)
  262.     
  263.     Case 2  'Right Tab
  264.         'draw up to the left of the tab
  265.         If rCorner = 1 Then
  266.             'don't offset Y and make room for next arc
  267.             Printer.Line (rBeginX + .1, rBeginY)-Step(((rotWidth - 3) + .625), 0)
  268.         Else
  269.             'move back to the corner
  270.             Printer.Line (rBeginX, rBeginY)-Step(((rotWidth - 3) + .625), 0)
  271.         End If
  272.         'begin the tab (angle up)
  273.         Printer.Line Step(0, 0)-Step(.2, -.3)
  274.         '*************************************************************************
  275.             'grab the CurrentX and CurrentY to put tab text here later
  276.             rotTabX = Printer.CurrentX + .05
  277.             rotTabY = Printer.CurrentY + .06
  278.         '*************************************************************************
  279.         'top of the tab
  280.         Printer.Line Step(0, 0)-Step(1.95, 0)
  281.         'finish the tab (angle down)
  282.         Printer.Line Step(0, 0)-Step(.2, .3)
  283. End Select
  284.  
  285. If rTab <> 2 Then  'if not a right tab
  286.     Call PrintArc(1, .1, rCorner)
  287. End If
  288.  
  289. 'down the right side
  290. If rTab <> 2 Then 'I drew the arc
  291.     If rCorner = 1 Then
  292.         'don't offset Y and make room for next arc
  293.         Printer.Line Step(.1, 0)-Step(0, rotHeight - .1)
  294.     Else
  295.         'move back to the corner
  296.         Printer.Line Step(.1, -.1)-Step(0, rotHeight)
  297.     End If
  298. Else
  299.     Printer.Line Step(0, 0)-Step(0, rotHeight)
  300. End If
  301.  
  302. 'add the lower right ARC
  303. Call PrintArc(4, .1, rCorner)
  304.  
  305. 'bottom right corner
  306. If rCorner = 1 Then
  307.     'don't offset X and compensate
  308.     Printer.Line Step(0, .1)-Step(-((1 + rotMid / 16) - .1), 0)
  309. Else
  310.     'move back to the corner
  311.     Printer.Line Step(.1, .1)-Step(-(1 + rotMid / 16), 0)
  312. End If
  313.  
  314. 'Print the T Hole
  315. Call PrintTHole
  316.  
  317. 'bottom middle
  318. Printer.Line Step(0, 0)-Step(-.875, 0)
  319.  
  320. 'Print the T Hole
  321. Call PrintTHole
  322.  
  323. 'bottom left corner
  324. If rCorner = 1 Then
  325.     'stop short
  326.     Printer.Line Step(0, 0)-(rBeginX + .1, rBeginY + rotHeight + .1)
  327. Else
  328.     'move back to the corner
  329.     Printer.Line Step(0, 0)-(rBeginX, rBeginY + rotHeight)
  330. End If
  331.  
  332. 'add the lower left ARC
  333. Call PrintArc(3, .1, rCorner)
  334.  
  335. 'left side
  336. If rCorner = 1 Then
  337.     If rTab <> 1 Then
  338.         'don't offset Y and compensate
  339.         Printer.Line Step(-.1, 0)-Step(0, -rotHeight + .1)
  340.     Else
  341.         'don't offset Y and compensate
  342.         Printer.Line Step(-.1, 0)-Step(0, -rotHeight)
  343.     End If
  344. Else
  345.     'move back to the corner
  346.     Printer.Line Step(-.1, .1)-Step(0, -rotHeight)
  347. End If
  348.  
  349. 'add the upper left ARC
  350. If rTab <> 1 Then
  351.     Call PrintArc(2, .1, rCorner)
  352. End If
  353. '************************************************************
  354. 'Print the Scissors Wingding
  355. Select Case rTab
  356.     Case 1  'if a left tab, place on the right
  357.         Call PrintScissors(rBeginX + rotWidth - .25, rBeginY)
  358.     
  359.     Case Else   'otherwise place on the left.
  360.         Call PrintScissors(rBeginX, rBeginY)
  361. End Select
  362. '************************************************************
  363. 'middle vertical line (NOT the Exact middle, adjusted for MY text)
  364. Printer.DrawWidth = 3   'big line
  365. Printer.Line (rBeginX + rBarX, rBeginY + .125)-Step(0, rBarY)
  366. Printer.DrawWidth = 1   'regular line
  367. '************************************************************
  368. 'Description text under card
  369. 'Enable the following GoTo, to bypass this text.
  370. 'GoTo NoCardDesc
  371.     Printer.FontName = "Arial"
  372.     Printer.FontBold = False
  373.     Printer.FontSize = 9.75
  374.     Printer.CurrentX = rBeginX + ((rotWidth - Printer.TextWidth(rotMsg)) / 2)
  375.     If rCorner = 1 Then
  376.         Printer.CurrentY = rBeginY + rotHeight + .2
  377.     Else
  378.         Printer.CurrentY = rBeginY + rotHeight + .1
  379.     End If
  380.     Printer.Print rotMsg
  381.  
  382. NoCardDesc:
  383. '************************************************************
  384. 'Enter Text on the Tab
  385. Select Case rTab
  386.     Case 0  'if no tab
  387.         'do nothing
  388.     Case Else   'otherwise print the tab
  389.         Call PrintTabText
  390. End Select
  391. '************************************************************
  392. 'Enter Name/Address on the Card
  393. Call PrintCardText(rBeginX, rBeginY)
  394. '************************************************************
  395. 'eject the page if rDoEnd is True
  396. If rDoEnd = True Then
  397.     Printer.NewPage
  398.     Printer.EndDoc
  399. End If
  400. '************************************************************
  401. End Sub
  402.  
  403. Sub PrintArc (Qdrnt As Integer, rRad As Double, rCorner As Integer)
  404. 'Qdrnt = The quadrant to draw (see below)
  405. 'rRad  = The radius of the Arc.
  406.  
  407. rotCurStyle = Printer.DrawStyle    'grab the current DrawStyle
  408.  
  409. 'enable the following line for ALWAYS DOTTED_LINE, or other.
  410. 'With this you can place a dotted arc on a solid frame, or any other
  411. 'combination. You could pass this parameter as well if you wish.
  412.  
  413. 'Printer.DrawStyle = DOTTED_LINE
  414.  
  415. rRadX = rRad
  416. rRadY = rRad
  417. 'radian conversion (sorry, I like degrees)
  418. RAD_CONV = PI / 180
  419. rotArcColor = 0    'black
  420.  
  421. 'Print 1 of the 4 Arcs.
  422. Select Case Qdrnt
  423.     Case 1  'upper right
  424.         If rCorner = 1 Then rRadX = 0   'assumes coming in from the left
  425.         Printer.Circle Step(-rRadX, rRadY), rRad, QBColor(rotArcColor), (0 * RAD_CONV), (90 * RAD_CONV)
  426.     
  427.     Case 2  'upper left
  428.         If rCorner = 1 Then rRadY = 0   'assumes coming in from the bottom
  429.         Printer.Circle Step(rRadX, rRadY), rRad, QBColor(rotArcColor), (90 * RAD_CONV), (180 * RAD_CONV)
  430.     
  431.     Case 3  'lower left
  432.         If rCorner = 1 Then rRadX = 0   'assumes coming in from the right
  433.         Printer.Circle Step(rRadX, -rRadY), rRad, QBColor(rotArcColor), (180 * RAD_CONV), (270 * RAD_CONV)
  434.     
  435.     Case 4  'lower right
  436.         If rCorner = 1 Then rRadY = 0   'assumes coming in from the top
  437.         Printer.Circle Step(-rRadX, -rRadY), rRad, QBColor(rotArcColor), (270 * RAD_CONV), (0 * RAD_CONV)
  438. End Select
  439.  
  440. Printer.DrawStyle = rotCurStyle   'reset to incoming DrawStyle
  441.  
  442. End Sub
  443.  
  444. Sub PrintCardText (rBeginX As Double, rBeginY As Double)
  445.     
  446.     'rBeginX and Y are passed UNALTERED from the calling routine,
  447.     'so add an offset. DON't alter rBeginX and Y, so use your own
  448.     'variable name (rotNameX and rotNameY).
  449.  
  450.     rotNameX = rBeginX + .15
  451.     rotNameY = rBeginY + .15
  452.     
  453.     'set up the size, bold, etc.
  454.     Printer.FontItalic = False
  455.     Printer.FontBold = True
  456.     Printer.FontSize = 12
  457.     Printer.CurrentX = rotNameX
  458.     Printer.CurrentY = rotNameY
  459.     
  460.     'company name
  461.     'mine is a little strange, with the italics in the middle, so
  462.     'you may want to alter this.
  463.     'NOTE that the semicolon holds the CurrentX and CurrentY at the
  464.     'end of the text, so they stay on the same line without a lot of fuss.
  465.     Printer.Print "VB";
  466.     Printer.FontItalic = True
  467.     Printer.Print "rainStorm";
  468.     Printer.FontItalic = False
  469.     Printer.Print " Software";
  470.     
  471.     'set up the size, bold, etc.
  472.     Printer.FontBold = False
  473.     Printer.FontSize = 8.25
  474.     Printer.Print "⌐"
  475.     Printer.FontSize = 12
  476.     Printer.FontBold = True
  477.     
  478.     'your name
  479.     Printer.CurrentX = rotNameX
  480.     Printer.CurrentY = Printer.CurrentY + .05 'add a little offset (optional)
  481.     Printer.Print "P. Scott Antony"
  482.     
  483.     'your address
  484.     Printer.FontBold = False
  485.     Printer.FontSize = 9.75
  486.     Printer.CurrentX = rotNameX
  487.     Printer.Print "P.O. Box 11047"
  488.     
  489.     Printer.CurrentX = rotNameX
  490.     Printer.Print "Shorewood, WI  53211"
  491.     
  492.     'add a blank line
  493.     Printer.Print " "
  494.     
  495.     'On "The Net"
  496.     Printer.FontBold = True
  497.     Printer.CurrentX = rotNameX
  498.     Printer.Print "On ""The Net"""
  499.     Printer.FontBold = False
  500.     
  501.     Printer.CurrentX = rotNameX
  502.     Printer.Print "PSAntony@aol.com"
  503.     
  504.     Printer.CurrentX = rotNameX
  505.     Printer.Print "74002.2373@compuserve.com"
  506.  
  507. End Sub
  508.  
  509. Sub PrintScissors (rBeginX As Double, rBeginY As Double)
  510.  
  511.     'Print the Scissors Wingding
  512.     On Error Resume Next    'if Wingdings is not installed
  513.     Printer.FontName = "Wingdings"
  514.     If Printer.FontName <> "Wingdings" Then Exit Sub
  515.     Printer.FontBold = False
  516.     Printer.FontSize = 12
  517.     Printer.CurrentX = rBeginX
  518.     Printer.CurrentY = rBeginY - .2
  519.     Printer.Print "#"
  520.  
  521. End Sub
  522.  
  523. Sub PrintTabText ()
  524.     
  525.     'Enter Text on the Tab (only called if there is a tab requested).
  526.     Printer.FontBold = True
  527.     Printer.FontSize = 12
  528.     'rotTabX and rotTabY were preset in Print_Rotary() while drawing the
  529.     'line. You could also pass them to this routine if you prefer to
  530.     'further modulize it for other tasks.
  531.     Printer.CurrentX = rotTabX
  532.     Printer.CurrentY = rotTabY
  533.     
  534.     'company name
  535.     'mine is a little strange, with the italics in the middle, so
  536.     'you may want to alter this.
  537.     'NOTE that the semicolon holds the CurrentX and CurrentY at the
  538.     'end of the text, so they stay on the same line.
  539.     Printer.Print "VB";
  540.     Printer.FontItalic = True
  541.     Printer.Print "rainStorm";
  542.     Printer.FontItalic = False
  543.     Printer.Print " Software";
  544.     Printer.FontBold = False
  545.     Printer.FontSize = 8.25
  546.     
  547.     'this line does not have a semicolon so CurrentX and CurrentY "feed".
  548.     Printer.Print "⌐"
  549.     Printer.FontSize = 12
  550.  
  551. End Sub
  552.  
  553. Sub PrintTHole ()
  554. 'This subroutine STARTS the T Hole at the CURRENT X and Y positions.
  555.  
  556. rotCurStyle = Printer.DrawStyle    'grab the current DrawStyle
  557.     
  558. 'enable the following line for ALWAYS DOTTED_LINE, or other.
  559. 'With this you can place a dotted T hole on a solid frame, or any other
  560. 'combination. You could pass this parameter as well if you wish.
  561.  
  562. 'Printer.DrawStyle = DOTTED_LINE
  563. Printer.Line Step(0, 0)-Step(0, -3 / 16)            'up
  564. Printer.Line Step(0, 0)-Step(1 / 16, 0)             'right
  565. Printer.Line Step(0, 0)-Step(0, -5 / 16)            'up
  566. Printer.Line Step(0, 0)-Step(-1 / 4, 0)             'left
  567. Printer.Line Step(0, 0)-Step(0, 5 / 16)             'down
  568. Printer.Line Step(0, 0)-Step(1 / 16, 0)             'right
  569. Printer.Line Step(0, 0)-Step(0, 3 / 16)             'down
  570.     
  571. Printer.DrawStyle = rotCurStyle   'reset to incoming DrawStyle
  572.  
  573. End Sub
  574.  
  575.